package utils

import (
	"fmt"
	"strconv"
	"time"
)

func GenerateTeacherID(id uint) string {
	currentDate := time.Now().Format("20060102")
	idStr := strconv.FormatUint(uint64(id), 10)
	paddedID := fmt.Sprintf("%08s", idStr)

	// 4. 组合成工号：TR + 日期 + 8位编号
	workID := "TR" + currentDate + paddedID
	return workID
}
